
#include <stddef.h>
#include <stdexcept>

#include "LinkedHashEntry.h"

LinkedHashEntry::LinkedHashEntry(HashedKey *key, ICollectible *value):
    key(key), value(value), next(NULL)
{
    if(key == NULL)
        throw std::invalid_argument("key es NULL");
    if(value == NULL)
        throw std::invalid_argument("value es NULL");
}

HashedKey *LinkedHashEntry::getKey()
{
    return key;
}

void LinkedHashEntry::setKey(HashedKey *k)
{
    key = k;
}

ICollectible *LinkedHashEntry::getValue()
{
    return value;
}
void LinkedHashEntry::setValue(ICollectible *value)
{
    this->value = value;
}

LinkedHashEntry *LinkedHashEntry::getNext()
{
    return next;
}
        
void LinkedHashEntry::setNext(LinkedHashEntry *next)
{
    this->next = next;
}

